namespace PickGold.Charting
{
    using System;

    internal class NameReferenceChangedEventArgs : EventArgs
    {
        private string _newName;
        private ChartNamedElement _oldElement;
        private string _oldName;

        public NameReferenceChangedEventArgs(ChartNamedElement oldElement, ChartNamedElement newElement)
        {
            this._oldElement = oldElement;
            this._oldName = (oldElement != null) ? oldElement.Name : string.Empty;
            this._newName = (newElement != null) ? newElement.Name : string.Empty;
        }

        public NameReferenceChangedEventArgs(ChartNamedElement oldElement, string oldName, string newName)
        {
            this._oldElement = oldElement;
            this._oldName = oldName;
            this._newName = newName;
        }

        public string NewName
        {
            get
            {
                return this._newName;
            }
        }

        public ChartNamedElement OldElement
        {
            get
            {
                return this._oldElement;
            }
        }

        public string OldName
        {
            get
            {
                return this._oldName;
            }
        }
    }
}

